package leetcode.search;

import leetcode.search.comon.SearchUtils;

class Solution154 {
    public int findMin(int[] nums) {
        return SearchUtils.findMinWithRepeatedNum(nums);
    }
}

public class leetcode154 {
    public static void main(String[] args) {
        Solution154 solution154 = new Solution154();
        int[] nums = {2, 2, 2, 0, 1};
        int[] nums1 = {2, 2, 2, 0, 2};
        int[] nums2 = {2, 2, 2, 2, 2};
        int[] nums3 = {2, 2, 3, 0, 2};
        int[] nums4 = {4, 5, 6, 7, 0, 1, 4};
        int[] nums5 = {0, 1, 4, 4, 5, 6, 7};
        int[] nums6 = {1, 3, 3, 3};
        int[] nums7 = {10, 1, 10, 10, 10};
        int[] nums8 = {4,5,6,7,0,1,2};
        System.out.println(solution154.findMin(nums));
        System.out.println(solution154.findMin(nums1));
        System.out.println(solution154.findMin(nums2));
        System.out.println(solution154.findMin(nums3));
        System.out.println(solution154.findMin(nums4));
        System.out.println(solution154.findMin(nums5));
        System.out.println(solution154.findMin(nums6));
        System.out.println(solution154.findMin(nums7));
        System.out.println(solution154.findMin(nums8));
    }
}
